import java.util.Arrays;

/**
 * @Author YuanYuan
 * @Date 2022/7/16
 * @Time 15:09
 */
public class TestDemo {
    public static void main(String[] args) {
        int[] arr1 = {27,15,19,18,28,34,65,49,25,37};
        PriorityQueue priorityQueue = new PriorityQueue(arr1,arr1.length);
        priorityQueue.createHeap(arr1);
        System.out.println(Arrays.toString(priorityQueue.elem));
        priorityQueue.push(80);
        System.out.println(Arrays.toString(priorityQueue.elem));
        priorityQueue.pollHeap();
        System.out.println(Arrays.toString(priorityQueue.elem));
    }
    public static void main1(String[] args) {
        Solution solution = new Solution();
        int[] arr = {1,3,5,7,2,4,6,8};
        int k = 4;
        int[] arr1 = solution.smallestK(arr, k);
        System.out.println(Arrays.toString(arr1));
    }
}
